package procsim;

public class PaintInstructionFetch extends PaintTab {
    public PaintInstructionFetch(Paint parent){
        super(parent);
        // Coordinates
        Design.ldIR1.addCoords(this, Design.IR_1.getLdCoords(30));
        Design.ldIR2.addCoords(this, Design.IR_2.getLdCoords(30));
        Design.ldIR3.addCoords(this, Design.IR_3.getLdCoords(30));
        Design.ldIR4.addCoords(this, Design.IR_4.getLdCoords(30));
        Design.MDRout.addCoords(this, 20, 20, 705, 20);
        Design.MDRout.addCoords(this, Design.IR_1.getInCoords(30).verticalFlip());
        Design.MDRout.addCoords(this, Design.IR_2.getInCoords(30).verticalFlip());
        Design.MDRout.addCoords(this, Design.IR_3.getInCoords(30).verticalFlip());
        Design.MDRout.addCoords(this, Design.IR_4.getInCoords(30).verticalFlip());
        Design.IR31_24.addCoords(this, Design.IR_1.getOutCoords(30));
        Design.IR23_16.addCoords(this, Design.IR_2.getOutCoords(30));
        Design.IR15_8.addCoords(this, Design.IR_3.getOutCoords(30));
        Design.IR7_0.addCoords(this, Design.IR_4.getOutCoords(30));
        Design.IR31.addCoords(this, Design.IFDC1.getEnableCoords(20));
        Design.IR22.addCoords(this, 20, 220, 50, 220);
        Design.IR23.addCoords(this, 20, 270, 50, 270);
        Design.regdir.addCoords(this, 150, 200, 180, 200);
        Design.regind.addCoords(this, 150, 230, 180, 230);
        Design.regindpom.addCoords(this, 150, 260, 180, 260);
        Design.rest.addCoords(this, 150, 290, 270, 290);
        Design.rest.addCoords(this, 270, 290, 270, 160);
        Design.rest.addCoords(this, 270, 160, 400, 160);
        Design.rest.addCoords(this, Design.IFDC2.getEnableCoords(20));
        Design.IR16.addCoords(this, 320, 220, 350, 220);
        Design.IR17.addCoords(this, 320, 270, 350, 270);
        Design.memdir.addCoords(this, 450, 200, 480, 200);
        Design.memind.addCoords(this, 450, 230, 480, 230);
        Design.rel.addCoords(this, 450, 260, 480, 260);
        Design.imm.addCoords(this, 450, 290, 480, 290);
        Design.memdir.addCoords(this, Design.IFOR4.getUpper2Coords(50));
        Design.memind.addCoords(this, Design.IFOR4.getLower2Coords(50));
        Design.mem.addCoords(this, Design.IFOR4.getResCoords(30));
        Design.regdir.addCoords(this, Design.IFOR5.getUpper2Coords(50));
        Design.imm.addCoords(this, Design.IFOR5.getLower2Coords(50));
        Design.immreg.addCoords(this, Design.IFOR5.getResCoords(30));
        Design.IR31.addCoords(this, Design.IFOR1.getUpper2Coords(30));
        Design.IR30.addCoords(this, Design.IFOR1.getLower2Coords(30));
        Design.L1.addCoords(this, Design.IFOR1.getResCoords(20));
        Design.IR31.addCoords(this, Design.IFAND1.getUpper3CoordsInv(35));
        Design.IR30.addCoords(this, Design.IFAND1.getMiddle3Coords(35));
        Design.IR29.addCoords(this, Design.IFAND1.getLower3Coords(35));
        Design.L2in3.addCoords(this, Design.IFAND1.getResCoords(40));
        Design.IR31.addCoords(this, Design.IFAND2.getUpper3CoordsInv(35));
        Design.IR30.addCoords(this, Design.IFAND2.getMiddle3Coords(35));
        Design.IR29.addCoords(this, Design.IFAND2.getLower3CoordsInv(35));
        Design.L3in1.addCoords(this, Design.IFAND2.getResCoords(40));
        Design.regdir.addCoords(this, Design.IFOR2.getUpper3Coords(30));
        Design.regind.addCoords(this, Design.IFOR2.getMiddle3Coords(35));
        Design.L2in3.addCoords(this, Design.IFOR2.getLower3Coords(30));
        Design.L2.addCoords(this, Design.IFOR2.getResCoords(30));
        Design.L3in1.addCoords(this, Design.IFOR3.getUpper3Coords(30));
        Design.rel.addCoords(this, Design.IFOR3.getMiddle3Coords(30));
        Design.regindpom.addCoords(this, Design.IFOR3.getLower3Coords(60));
        Design.L3.addCoords(this, Design.IFOR3.getResCoords(30));
        Design.regind.addCoords(this, Design.IFOR6.getUpper2Coords(50));
        Design.regindpom.addCoords(this, Design.IFOR6.getLower2Coords(50));
        Design.regip.addCoords(this, Design.IFOR6.getResCoords(30));

        // Collections
        elements.add(Design.IR_1);
        elements.add(Design.IR_2);
        elements.add(Design.IR_3);
        elements.add(Design.IR_4);
        elements.add(Design.IFDC1);
        elements.add(Design.IFDC2);
        elements.add(Design.IFInv1);
        elements.add(Design.IFInv2);
        elements.add(Design.IFInv3);
        elements.add(Design.IFAND1);
        elements.add(Design.IFAND2);
        elements.add(Design.IFOR1);
        elements.add(Design.IFOR2);
        elements.add(Design.IFOR3);
        elements.add(Design.IFOR4);
        elements.add(Design.IFOR5);
        elements.add(Design.IFOR6);

        lines.add(Design.MDRout);
        lines.add(Design.IR31_24);
        lines.add(Design.IR23_16);
        lines.add(Design.IR15_8);
        lines.add(Design.IR7_0);
        lines.add(Design.ldIR1);
        lines.add(Design.ldIR2);
        lines.add(Design.ldIR3);
        lines.add(Design.ldIR4);
        lines.add(Design.IR31);
        lines.add(Design.IR30);
        lines.add(Design.IR29);
        lines.add(Design.IR23);
        lines.add(Design.IR22);
        lines.add(Design.IR17);
        lines.add(Design.IR16);
        lines.add(Design.regdir);
        lines.add(Design.regind);
        lines.add(Design.regindpom);
        lines.add(Design.rest);
        lines.add(Design.memdir);
        lines.add(Design.memind);
        lines.add(Design.rel);
        lines.add(Design.imm);
        lines.add(Design.mem);
        lines.add(Design.immreg);
        lines.add(Design.regip);
        lines.add(Design.L1);
        lines.add(Design.L2);
        lines.add(Design.L3);
        lines.add(Design.L3in1);
        lines.add(Design.L2in3);
    }
}
